from common.base_page import BasePage

from appium.webdriver.common.appiumby import AppiumBy
from time import sleep


class SearchPage(BasePage):
    #返回按钮
    # btn_back=(AppiumBy.ID,'com.jhss.youguu:id/btn_back')
    '''点击聊股'''

    btn_desktop_discovery = (AppiumBy.ID, 'com.jhss.youguu:id/btn_desktop_discovery')
    '''输入框'''
    ll_fake_search_btn=(AppiumBy.ID,'com.jhss.youguu:id/ll_fake_search_btn')
    '''输入文字'''
    et_stock_search=(AppiumBy.ID,'com.jhss.youguu:id/et_stock_search')
    #断言
    TextView=(AppiumBy.ID,'com.jhss.youguu:id/nickNameView')


    def search(self,title):
        ''''点击聊股'''
        self.click_ele(self.btn_desktop_discovery)
        sleep(1)
        self.click_ele(self.ll_fake_search_btn)
        sleep(2)
        #输入文字
        self.send_keys(self.et_stock_search,title)
        sleep(2)

